package com.ygqh.baby.service;

import java.util.Date;
import java.util.List;

import com.ygqh.baby.ao.CardMode;
import com.ygqh.baby.ao.CardType;
import com.ygqh.baby.ao.Message;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.CardCouponAction;
import com.ygqh.baby.po.YgCardCoupon;

public interface YgCardCouponService {

	List<YgCardCoupon> find();

	int findCount();

	YgCardCoupon findById(Long id);

	int deleteSoft(Long[] ids, String handler);

	int deleteSoft(Long id, String handler);

	int save(YgCardCoupon ygCardCoupon);

	int update(YgCardCoupon ygCardCoupon);

	int saveOrUpdate(YgCardCoupon ygCardCoupon);

	/**
	 * 同种类型,相同赠品的卡券，每月只能存在一条
	 *
	 * @param cardType
	 * @param cardMode
	 * @param date
	 * @return
	 */
	Boolean exitCard(CardType cardType, CardMode cardMode, Date date);

	ResultSet<YgCardCoupon> search(QueryInfo queryInfo, CardType cardType, CardMode cardMode, Date startDate,
								   Date endDate, String q);

	List<YgCardCoupon> findCardsByMonth(CardType cardType, CardMode cardMode, Date date);

	YgCardCoupon getDrawPrizeCard(CardMode cardMode);

	/**
	 * 验证拉新活动卡券的有效性
	 *
	 * @return
	 */
	Message validatePullNewCardCoupon();

	/**
	 * 获取卡券活动信息
	 *
	 * @return
	 */
	CardCouponAction getCardCouponActionInfoFromRedis();

}
